package cocurrency.phraser;

import java.util.concurrent.Phaser;

/**
 * Created by luzl on 8/5/2017.
 */
public class MyThread extends Thread{
    private int startIndex;
    private Phaser phaser;

    public MyThread(int startIndex, Phaser phaser){
        this.startIndex=startIndex;
        this.phaser=phaser;
    }
    public void run(){
        phaser.arrive();
        System.out.println("Running startIndex=>"+startIndex+" ,phase=>"+phaser.getPhase());
    }
}
